package com.liyang.springcloud.controller;

import com.liyang.springcloud.service.PaymentFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @BelongsProject: cloud-2024
 * @BelongsPackage: com.liyang.springcloud.controller
 * @Author: liyang
 * @CreateTime: 2023-12-26  16:42
 * @Description: openfeign  调用  客户端
 * @Version: 1.0
 */
@RestController
@Slf4j
@RequestMapping("/consumer/feign")
public class OrderFeignController {

    @Resource
    private PaymentFeignService paymentFeignService;

    @GetMapping("/getPort")
    public String getPort() {
        return paymentFeignService.getPort();
    }

    @GetMapping("/getPort/timeout")
    public String getPortTimeout() {
        return paymentFeignService.getPortTimeout();
    }
}
